package com.clps.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.clps.common.R;
import com.clps.dto.DepositDto;
import com.clps.entity.Deposit;
import com.clps.mapper.DepositMapper;
import com.clps.service.DepositService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ywl
 * @since 2022-09-07
 */
@Service
public class DepositServiceImpl extends ServiceImpl<DepositMapper, Deposit> implements DepositService {
    @Autowired
    DepositMapper depositMapper;

    /**
     * 根据银行卡号进行模糊查询，默认为查询全部
     * @param cardNumber
     * @return
     */
    @Override
    public R<List<Deposit>> queryByCardNumber(String cardNumber) {
        List<Deposit> deposit = depositMapper.getDepositByCarNumber(cardNumber);
        return deposit!=null ? R.success(deposit):R.error("请求失败") ;
    }

    @Override
    public DepositDto queryDepositWithUserInfoById(Long id) {
        return null;
    }


}
